<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="java.net.URLEncoder" %>
<%
String url = (String) request.getSession().getAttribute("url");
String vu = URLEncoder.encode(JSONObject.toJSONString(request.getSession().getAttribute("vu")), "UTF-8");
String sysUser = URLEncoder.encode(JSONObject.toJSONString(request.getSession().getAttribute("sysUser")), "UTF-8");
String loginId = (String) request.getSession().getAttribute("loginId");
String subjectName = URLEncoder.encode(request.getAttribute("subjectName").toString(), "UTF-8");
String sysOrgs = URLEncoder.encode(JSONObject.toJSONString(request.getSession().getAttribute("sysOrgs")), "UTF-8");
String subjectId = (String) request.getAttribute("subjectId");
String groupMap = URLEncoder.encode(request.getAttribute("groupMap").toString(),"UTF-8");
String loginIdDeptMap = URLEncoder.encode(request.getAttribute("loginIdDeptMap").toString(),"UTF-8");
%>
<%@include file="head.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
    <style type="text/css">
      *{
	    margin: 0;
	    padding: 0;
      }
    </style>
  </head>
  <script>
    $(function() {
      //参数赋值：
      var url = "<%=url%>";//不跳转后台，直接跳转页面
        var params = {vu: '<%=vu%>', sysUser: '<%=sysUser%>', subjectName: '<%=subjectName%>', sysOrgs: '<%=sysOrgs%>', groupMap: '<%=groupMap%>', loginIdDeptMap: '<%=loginIdDeptMap%>'};
      if ('<%=subjectId%>' == 30) {
        params = {loginId: '<%=loginId%>'}
      }

      //调用post请求
      Post(url,params);
    });


    /*
    *功能： 模拟form表单的提交
    *参数： url 跳转地址 params 参数
     */
    function Post(url, params) {
      var form = $("<form method='post'></form>");
      form.attr({"action":url});
      for (pa in params) {
        var input = $("<input type='hidden'>");
        input.attr({"name":pa});
        input.val(params[pa]);
        form.append(input);
      }
      $("html").append(form);
      form.submit();
    }




  </script>
  
  <body>
  </body>

</html>
